<template>
  <PagingTable ref="pagingTable" :options="options" :querys="querys" >
    <template slot="filter-content">
      <el-input v-model="querys.name" placeholder="搜索考试名称" style="width: 200px;" class="filter-item" />
    </template>

    <template slot="data-columns">
      <el-table-column label="考试名称" prop="name" show-overflow-tooltip />

      <el-table-column label="操作" align="center" >
        <template slot-scope="scope">
          <el-button icon="el-icon-caret-right" type="primary" size="mini" @click="handlePre(scope.row.id)">去考试</el-button>
        </template>
      </el-table-column>
    </template>
  </PagingTable>
</template>

<script>
import PagingTable from '@/components/PagingTable'

export default {
  name: 'ExamList',
  components: { PagingTable },
  data() {
    return {
      querys: { },

      options: {
        controllerUrl: '/subject', // 列表请求URL
      }
    }
  },
  methods: {

    // 开始考试
    handlePre(id) {
      this.$router.push({ name: 'ExamProcess', params: { id }})
    }
  }
}
</script>
